﻿@model IList<PaymentPlatform>
<div class="pageContent" style="padding: 5px;">
    <div id="platform" class="unitBox" style="float: left; display: block; overflow: auto;
        width: 514px;">
        <div class="pageHeader" style="border: 1px #B8D0D6 solid">
            <div class="searchBar">
                <div style="height: 40px; line-height: 40px;">
                    第三方支付平台</div>
            </div>
        </div>
        <div class="pageContent" style="border-left: 1px #B8D0D6 solid; border-right: 1px #B8D0D6 solid">
            <div class="panelBar">
                <ul class="toolBar">
                    <li><a class="add" href="/payment/platform" target="dialog" mask="true"><span>添加</span></a></li>
                    <li><a class="edit" href="/payment/platform/{param}" target="dialog" mask="true"><span>
                        编辑</span></a></li>
                    <li><a class="delete" href="/payment/deleteplatform/{param}" target="ajaxTodo" title="确定要删除吗?">
                        <span>删除</span></a></li>
                </ul>
            </div>
            <table class="table" width="99%" layouth="138" rel="platform">
                <thead>
                    <tr>
                        <th width="80">
                            名 称
                        </th>
                        <th width="50">
                            顺 序
                        </th>
                        <th width="150">
                            图 片
                        </th>
                        <th>
                            描 述
                        </th>
                        <th width="50">
                            状 态
                        </th>
                        <th width="80">
                            操作
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var o in Model.OrderBy(x=>!x.Status).ThenBy(x=>x.Priority))
                    {
                        <tr target="param" rel="@o.Id">
                            <td>@o.Name
                            </td>
                            <td>@o.Priority
                            </td>
                            <td>@o.Image
                            </td>
                            <td>@o.Description
                            </td>
                            <td>@(o.Status ? "可用" : "不可用")
                            </td>
                            <td>
                                <a href="/payment/ebanks/@o.Id" target="ajax" rel="ebank">载入银行</a>
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
            <div class="panelBar">
                <div class="pages">
                    <span>共@(Model.Count)条</span>
                </div>
            </div>
        </div>
    </div>
    <div id="ebank" class="unitBox" style="margin-left: 520px;">
        @{
            var platform = Model.FirstOrDefault();
            if (platform != null)
            {
                var param = platform.Id;
                Html.RenderAction("Ebanks", new { param });
            }
        }
    </div>
</div>
